#!/bin/sh
# Move audio files if it hasn't been done yet.
if [ -d $rbase/usr/lib/sounds -a ! -d $rbase/usr/share/data/sounds ]; then
    cd $rbase/usr/lib/sounds
    for i in `find . -type d -print`; do
	mkdir -p $rbase/usr/share/data/sounds/$i > /dev/null 2>&1
    done
    for i in `find . ! -type d -print`; do
	mv $i $rbase/usr/share/data/sounds/$i 
    done
    cd $rbase/usr/lib
    mv sounds sounds.O
fi
rm $rbase/.audio.inst.sh

if [ -d $rbase/usr/lib/sounds.O -a -d $rbase/usr/share/data/sounds ]; then
  rm -rf $rbase/usr/lib/sounds.O
fi
